<ion-view view-title="秒杀" class="myworld_sale">

	<!--描述：滑动块-->
	<ion-content scroll="false">
		<div class="row text-center font-large-my padding-0">
			<div class="col" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated':''">
				<img src="img/group1.png" /><br /> 活动设置
			</div>
			<div class="col" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated':''">
				<img src="img/group2.png" /><br /> 促销对象
			</div>
			<div class="col" on-tap="activeSlide(2)" ng-class="selectIndex==2?'top-activated':''">
				<img src="img/b4.png" /><br /> 秒杀红包
			</div>
		</div>

		<ion-slide-box delegate-handle="main-handle" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">

			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<!--<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>-->

					<!--不能引入外部的页面，因为这里要求可输入，而外部文件是不可输入的-->
					<!--<div ng-include="'templates/myworld/sale/activitysetting_tem.html'"></div>-->
					<div class="list">
						<li class="item item-input">
							活动名称：
							<input type="text" name="" placeholder="请输入活动名称" ng-model="scope.name" />
						</li>
						 <li class="item item-input" ion-datetime-picker title="'请输入开始时间'" ng-model="scope.start_time">
				<span class="input-label">开始时间：</span>
				<input type="text" placeholder="请输入开始时间" class="timeLight" ng-class="{'timeNoneInfo':scope.start_time}">{{scope.start_time| date: "yyyy-MM-dd H:mm:ss"}}</input>
			</li>
			<li class="item item-input" ion-datetime-picker title="'请输入开始时间'" ng-model="scope.end_time">
				<span class="input-label">结束时间：</span>
				<input type="text" placeholder="请输入结束时间" class="timeLight" ng-class="{'timeNoneInfo':scope.end_time}">{{scope.end_time| date: "yyyy-MM-dd H:mm:ss"}}</input>
			</li>
						<li class="item item-toggle">
							临时群
							<label class="toggle toggle-positive">
				             <input type="checkbox" checked="" ng-model="scope.create_group">
				             <div class="track">
				               <div class="handle"></div>
				             </div>
				           </label>
						</li>

						<li class="item item-toggle">
							自动红包
							<label class="toggle toggle-positive">
				             <input type="checkbox" checked="" ng-model="scope.has_packets">
				             <div class="track">
				               <div class="handle"></div>
				             </div>
				           </label>
						</li>

						<li class="item item-input-inset ">
							视频促销：
							<label class="checkbox checkbox-square padding-0">
				        		 <input type="checkbox"  ng-model="scope.live" on-tap="video_type('live')" />
				        	</label>直播
											<label class="checkbox checkbox-square padding-0 margin-left-10-my">
				        		 <input type="checkbox" ng-model="scope.recrod"  on-tap="video_type('record')" />
				        	</label>录像
											<label class="checkbox checkbox-square padding-0 margin-left-10-my">
				        		 <input type="checkbox" ng-model="scope.none" on-tap="video_type('none')" />
				        	</label>无视频1
						</li>

						<li class="item item-input">
							活动推广图：
							<div class="file-show">
					<div class="add input-file" ng-repeat="img in scope.image" style="overflow: initial;">
						<div style="position: absolute;margin-left: 1.5rem;margin-top: -1.0rem;font-size: 1.0rem;color: #333333;" on-tap="ondelete($index)"><i class="icon ion-close-circled"></i></div>
						<img style="width: 100%;height: 100%;" src="{{img.image}}">
					</div>
				</div>
				<div class="add input-file" on-tap="doShowFile()">
					<span class="icon ion-plus"></span>
				</div>
				<input id="upfilebutton" type="file" multiple="multiple" accept="image/*" onchange="angular.element(this).scope().onupload(this)" style="display: none;" />
						</li>
						<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
								<div class="input-label">品牌</div>
								<div class="input-value" ng-click="doSelectBrand()">{{input.brand.name}}</div>
							</div>
                        <li class="item item-input-inset">
							品类：
							<div class="input-value small" ng-click="doSelectCat1()" style="width: 22%;">{{input.cat1.name}}</div>
							<div class="input-value small" ng-click="doSelectCat2()" style="width: 22%;">{{input.cat2.name}}</div>
							<div class="input-value small" ng-click="doSelectCat3()" style="width: 22%;">{{input.cat3.name}}</div>
                            <i class="icon ion-plus-circled positive font-1rem-my" on-tap="add_type()"></i>&nbsp;
                        </li>
						<li class="item item-input item-icon-right" ng-repeat="cat in scope.cat_type" style="font-size: 12px;">
							<span class="invisible">分类：</span> {{cat.name}}
							<i class="icon ion-close-circled assertive" on-tap="delete_type($index)"></i>
						</li>
					</div>

					<div class="button-bar padding">
						<button class="button  button-assertive">取消</button>
						<button class="button  button-positive col-offset-10" on-tap="submit()">保存</button>
					</div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<!--<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>-->
				</ion-scroll>
			</ion-slide>

			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<!--<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>-->

					<div class="list" >
						<li class="item padding-10">
							授权中心列表
							<span class="right-zhang positive" on-tap="openSpec()">添加授权中心+</span>
						</li>
						<div class="list" ng-repeat="store in datas.store">
							<li class="item" style="padding: 6px 10px 5px 16px;">
							{{$index+1}}、{{store.store_name}}
							<span class="bian_red assertive right-zhang" style="padding: 0px 5px;" on-tap="delete_store(store.store_id)">删除</span>
						</li>
						<li class="item item-input">
							中奖数设置:&nbsp;
							<input type=" text" placeholder="请输入中奖数" class="padding-left" ng-model="store.prize_count" />
						</li>
						<li class="item item-input-inset">
							区域:
							<div class="input-value small" ng-click="doSelectProvince(store)">{{store.province.name}}</div>
			                <div class="input-value small" ng-click="doSelectCity(store)">{{store.city.name}}</div>
			                <div class="input-value small" ng-click="doSelectDistrict(store)">{{store.district.name}}</div>
							<i class="icon ion-plus-circled positive  font-1rem-my" on-tap="region_choose(store.store_id)"></i>
						</li>
						<li class="item item-borderless item-input-inset item-icon-right" ng-repeat="region in store.region">
							<span ng-class="{invisible:$index>0}">已选区域：</span>&nbsp;{{region.region_name}}
							<i class="icon ion-close-circled assertive " on-tap="region_delete(store.store_id,$index)"></i>
						</li>

					<div class="item">
							商品列表
							<span class="right-zhang positive" on-tap="openGoods(store.store_id)">添加商品+</span>
						</div>
						<li class="item item-thumbnail-left item-text-wrap padding-bottom" style="padding-right: 5px;" ng-repeat="goods in store.goods">
							<img src="{{goods.image}}">
							<span class="right-zhang assertive bian_red" style="padding: 0px 5px;" on-tap="delete_goods($index,store.store_id)">删除</span>
							<p>{{goods.goods_name}} </p>
							<p>
								<span class="left-zhang">价格：5000</span>
								<input type="text" class="right-zhang stable-bg shuru_zhang" placeholder="输入" ng-model="goods.seckill_price" />
								<span class="right-zhang assertive">秒杀价:</span>
							</p>
							<div class="clear_zhang"></div>
							<p>
								<span class="left-zhang assertive">数量：</span>
								<input type="text" class="left-zhang stable-bg shuru_zhang" placeholder="输入" ng-model="goods.count" />
								<input type="text" class="right-zhang stable-bg shuru_zhang" placeholder="输入" ng-model="goods.prize_price" />
								<span class="right-zhang assertive">中奖价:</span>
							</p>
							<div class="clear_zhang"></div>
							<p><span class="left-zhang assertive">限购数：</span><input type="text" class="left-zhang stable-bg shuru_zhang" style="width: 50%;" placeholder="限购数" ng-model="goods.limit_buy_num" /></p>
						</li>
						<li class="item item-toggle">
							是否允许改价
							<label class="toggle toggle-positive">
				             <input type="checkbox" checked="" ng-model="store.change_price">
				             <div class="track">
				               <div class="handle"></div>
				             </div>
				           </label>
						</li>
						</div>

					</div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<!--<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>-->
				</ion-scroll>
			</ion-slide>

			<!--秒杀红包-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<!--<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>-->
					<!--引入外部的文件-->
					<div ng-include="'templates/myworld/discount/promotionredbag_tem.html'"></div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<!--<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>-->
				</ion-scroll>
			</ion-slide>
		</ion-slide-box>
	</ion-content>
</ion-view>